/*
 * @Author: xiaosihan 
 * @Date: 2022-07-11 07:51:56 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2025-01-27 12:44:22
 */
import hashHistory from "@hashHistory";
import utils from "@utils";
import { Button, Radio } from "antd";
import { useEffect, useRef } from "react";
import threeLoader from "three-base/threeLoader";
import homeRenderer from "./homeRender";
import styles from './index.module.less';
import homeStore from "./homeStore";
import RunTime from "./component/RunTime/RunTime";
import CenterBtns from "./component/CenterBtns/CenterBtns";


const Home = () => {

    const dom = useRef<HTMLDivElement | null>(null);
    //     useEffect(() => {
    //         window.addEventListener("message", async e => {
    //             console.log("message", e);
    //             const file = await utils.selectFile();
    //             //@ts-ignore
    //             e.source.postMessage(file, "http://localhost:3000/upload");
    //         });
    //     }, []);

    return <div className={styles.home} ref={dom}>
        <div
            className={styles.container}
            ref={dom => homeRenderer.setContainer(dom)}
        ></div>
        {/* 中心按钮 */}
        <CenterBtns />
    </div>
}

export default Home;

